/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package api.user;

import Model.User.UserList;
import RssEasy.Core.HttpRequestHelper;
import RssEasy.Core.ServletRequestHelper;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author admin
 */
@WebServlet(name = "api_user_changestatus", urlPatterns = {"/api/user/changestatus"})
public class changestatus extends ServletRequestHelper {
 protected HttpRequestHelper request(HttpServletRequest request, HttpServletResponse response) {
        super.request(request, response);
        try {
              UserList entity = new UserList(this.pageContext);
              keyvalue("status",0);
              entity.update().where("myid=?",this.get("myid")).submit();
        } catch (Exception e) {
            out.print("{\"rsscode\":" + e.getMessage() + "}");
        }
        return this;
    }
  
}
